<?php
/**
 * The loop that displays posts.
 *
 * The loop displays the posts and the post content.  See
 * http://codex.wordpress.org/The_Loop to understand it and
 * http://codex.wordpress.org/Template_Tags to understand
 * the tags used in it.
 *
 * This can be overridden in child themes with loop.php or
 * loop-template.php, where 'template' is the loop context
 * requested by a template. For example, loop-index.php would
 * be used if it exists and we ask for the loop with:
 * <code>get_template_part( 'loop', 'index' );</code>
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */
?>
<!--<pre>--><?php //global $wp_query; print_r($wp_query->query_vars) ?><!--</pre>-->

<?php //Menu bar ?>
<table cellspacing="0px" cellpadding="0px" border="0" class="mainbox">
    <tr>
        <td valign="top">
            <table cellspacing="0px" cellpadding="0px" border="0" class="menubar">
                <tr>
                    <td width="360px"><a href="<?php echo home_url('/') ?>"><img
                            src="<?php bloginfo('stylesheet_directory')?>/images/logo.png" border="0" height="66px"
                            width="223px"></a></td>
                    <?php wv_top_menu() ?>
                </tr>
            </table>
            <!-- table menu -->
        </td>
    </tr>
</table>

<?php /* If there are no posts to display, such as an empty archive page */ ?>
<?php if ( ! have_posts() ) : ?>

<table id="content" cellspacing="0px" cellpadding="0px" border="0" width="100%">

    <tr height="371px">
        <td align="center">
			
			<h2 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h2>
			<div class="entry-content">
				<p><?php _e( 'Apologies, but no results were found for the requested archive. ', 'twentyten' ); ?></p>
			</div><!-- .entry-content -->

        </td>

		<td width="250px">
			<?php get_sidebar(); ?>
		</td>
    </tr>

</table>

<?php endif; ?>

<?php
	/* Start the Loop.
	 *
	 * In Twenty Ten we use the same loop in multiple contexts.
	 * It is broken into three main parts: when we're displaying
	 * posts that are in the gallery category, when we're displaying
	 * posts in the asides category, and finally all other posts.
	 *
	 * Additionally, we sometimes check for whether we are on an
	 * archive page, a search page, etc., allowing for small differences
	 * in the loop on each template without actually duplicating
	 * the rest of the loop that is shared.
	 *
	 * Without further ado, the loop:
	 */ ?>
<?php if (have_posts()) : the_post(); ?>

<table id="content" cellspacing="0px" cellpadding="0px" border="0" width="100%">

    <tr>
        <td colspan="2" align="right">
            <div class="blogclose">
                <a href="<?php echo get_page_link(get_page_by_title('what we like')->ID) ?>"
                   class="closeshow">&times;</a>
            </div>
        </td>
    </tr>
    <tr height="371px">
        <td width="220px" class="feature-image" >
            <?php if (has_post_thumbnail()) ?>  <?php the_post_thumbnail('product', array('class' => 'photo')); ?>
        </td>

        <td align="center">
			<div id="postscroll">
				<div class="viewport">
					<div class="overview">
	            		<div class="post">

			                <h2 class="entry-title"><?php the_title();?></h2> <?php  the_date(); ?>
			                <!-- .entry-meta -->

							<?php the_content(); ?>

			            </div>
					</div>
				</div>
			</div>
        </td>

		<td width="250px">
			<?php get_sidebar(); ?>
		</td>
    </tr>


</table>

<?php
endif;

//Bottom calendar
$year = date('Y');
?>

<table cellspacing="0px" cellpadding="0px" border="0" class="likes">

    <tr>
        <td class="month">

            <table cellspacing="0px" cellpadding="0px" border="0" width="100%" style="color:#666666;">
                <tr>
                    <?php wv_get_archives('month'); ?>
                </tr>
            </table>

        </td>
        <td class="year"><?php echo $year; ?></td>
    </tr>
    <tr>
        <td class="line"></td>
    </tr>
    <tr>
        <td class="day" align="right">

            <table cellspacing="0px" cellpadding="0px" border="0" class="dayfont">
                <tr>
                    <td align="center">
                        <?php wv_get_archives('day'); ?>
                    </td>
                    <td class="dayspace"></td>
                </tr>
            </table>
        </td>
        <td class="year"><a class="yearlink" href="<?php echo get_year_link($year - 1); ?>"><?php echo $year - 1; ?></a></td>
    </tr>
</table>